react-server675fbba4
react-servertreemaindocssrcpagesen(pages)api[slug=apiSlug].static.mjs
docs/src/pages/en/(pages)/api/[slug=apiSlug].static.mjsmjs389 B3d2952fc
import { apiReferenceIndex } from "../../../../lib/api-reference.mjs";

// Enumerate the SSG paths for `/api/:slug`. Each yielded entry maps the
// dynamic route param to its value; the file-router expands these into
// concrete paths like `/en/api/core`, `/en/api/client`, …
export default async function* () {
  for (const p of apiReferenceIndex()) {
    yield { slug: p.slug };
  }
}